package com.cellulam.framework.core.enums;

import com.cellulam.framework.core.utils.EnumHelper;
import lombok.Getter;

/**
 * 排序方式
 */
@Getter
public enum SortType implements CodeDescriptionFeature{

    /**
     * 正序
     */
    ASC(1, "正序"),


    /**
     * 倒序
     */
    DESC(2, "倒序");

    private final int code;
    private final String description;

    SortType(int code, String description){
        this.code = code;
        this.description = description;
    }

    public static SortType valueOf(Integer code) {
        return EnumHelper.valueOf(code, SortType.class);
    }
}
